//
//  OosDaoCallback.h
//  Oos4ios
//
//  Created by Pablo Gonzalez on 3/9/11.
//

#import <Foundation/Foundation.h>
#import "OosDaoTicket.h"
#import "../Model/OosObject.h"

@protocol IOosDaoCallback <NSObject>

- (void) resultedInError: (NSError *) error 
			  withTicket: (OosDaoTicket *) ticket;

@optional

// StatusCode 204
- (void) resultedCorrect: (OosDaoTicket *) ticket;

@end

@protocol IOosDaoCreateCallback <IOosDaoCallback>

- (void) createResult: (OosObject *) object 
		   withTicket: (OosDaoTicket *) ticket;

@end

@protocol IOosDaoReadCallback <IOosDaoCallback>

- (void) readResult: (NSArray *) array
		 withTicket: (OosDaoTicket *) ticket;

@end

@protocol IOosDaoUpdateCallback <IOosDaoCallback>

- (void) updatedWithTicket: (OosDaoTicket *) ticket;

@end

@protocol IOosDaoDeleteCallback <IOosDaoCallback>

- (void) deletedWithTicket: (OosDaoTicket *) ticket;

@end

@protocol IOosDaoSizeCallback <NSObject>

- (void) size: (NSNumber *) totalSize 
   withTicket: (OosDaoTicket *) ticket;

@end
